1. Field of the Invention
This invention relates to an automatic programming method and, more particularly, to an automatic programming method whereby miscellaneous data is inserted into previously created path data to create a numerical control program (NC program).
2. Description of the Related Art
A variety of automatic programming units have recently been put into practical use for the purpose of creating NC programs in a simple manner. With these automatic programming units, path data specifying a path can be simply created.
An NC program is composed not only of path data but also includes miscellaneous data executed or used at proper locations within the path, such data including miscellaneous function instruction data (M-function instruction data), T-function instruction data for designating a tool number, S-function instruction data for designating spindle rpm, F-feedrate instruction data for commanding cutting velocity, G-function instruction data, and the like. It is therefore required that a complete program be created by inserting these miscellaneous data into the above-mentioned path data.
Even if miscellaneous data are included to some degree in path data created by an automatic programming unit, there are many cases where this alone is insufficient and it is necessary to insert separate miscellaneous data into the path data to create a complete program.
FIG. 1 is a schematic view for describing a method of creating path data using an automatic programming unit. Assume that a tool TL is to be moved from a reference point P.sub.r (where P.sub.100 is the point obtained by projecting the reference point on the XY plane) to a point P.sub.1 ' in a rapid-traverse mode, thereafter to an approach point P.sub.a at a velocity F0100 (where F is a word address word indicating feedrate), thence to a machining starting point P.sub.1 at a cutting velocity F0050, thereafter back to the point P.sub.1 along straight lines S.sub.1 .fwdarw.S.sub.2 .fwdarw.S.sub.3 .fwdarw.S.sub.4 at the above-mentioned cutting velocity (F0050), and then, upon completion of machining, back to the reference point P.sub.r in the rapid-traverse mode along the path P.sub.1 .fwdarw.P.sub.1 '.fwdarw.P.sub.r. In such case the programmer first creates a part program, shown below. Assuming that the distance between the approach point P.sub.a and the reference point P.sub.r along the Z axis is 40, and that the Z-axis coordinate value of the reference point P.sub.r is 50: EQU P.sub.1 =x.sub.1, y.sub.1 (a) EQU S.sub.1 =xa.sub.l, ya.sub.1 ; xb.sub.1, yb.sub.1 (b) EQU S.sub.2 =xa.sub.2, ya.sub.2 ; xb.sub.2, yb.sub.2 (c) EQU S.sub.3 =xa.sub.3, ya.sub.3 ; xb.sub.3, yb.sub.3 (d) EQU S.sub.4 =xa.sub.4, ya.sub.4 ; xb.sub.4, yb.sub.4 (e) EQU FROM, P.sub.100, 50Z; (f) EQU RPD, P.sub.1 ; (g) EQU DLT, -40, F0100; (h) EQU DLT, -10, F0050; (i) EQU S.sub.1 ; (j) EQU S.sub.2; (k) EQU S.sub.3 ; (l) EQU S.sub.4 ; P.sub.1 ; (m) EQU RPD, DLT, 50; (n) EQU RPD, P100 (p) EQU M02; (q)
In the above statememts, (a) through (e) constitute a graphic definition statement which, by specifying the point P.sub.1 and straight lines S.sub.1 through S.sub.4, defines a machining graphic MFIG in the X-Y plane. Further, (f) through (q) constitute a motion definition statement, in which F0100 and F0050 in (h) and (i) are items of miscellaneous machining information indicative of cutting velocity. "RPD" signifies rapid traverse, the numerical value following "DLT" signifies an incremental value along the Z axis, and M02 signifies the program end.
Next, when the above-described part program has been applied to an automatic programming unit, the latter uses the input part program data to automatically create the following path data: EQU G92 X0.Y0. Z50.; (F) EQU G91 G00 Xx.sub.1 Yy.sub.1 ; (G) EQU G01 Z-40. F0100; (H) EQU Z-10. F0050; (I) EQU Xx.sub.12 Yy.sub.12 ; (J) EQU Xx.sub.23 Yy.sub.23 ; (K) EQU Xx.sub.34 Yy.sub.34 ; (L) EQU Xx.sub.41 Yy.sub.41; (M) EQU G00 Z50.; (N) EQU X0. Y0.; (P) EQU M02; (Q)
The blocks (F)-(Q) correspond to blocks (f)-(q) in the above-described part program. In the foregoing path data, (x.sub.1, y.sub.1) are the coordinate values of the point P.sub.1 in the XY plane, and (X.sub.ij, Y.sub.ij) are incremental values along the respective axes from the starting point of straight line S.sub.i to the point of intersection P.sub.ij between the straight line S.sub.i and straight line S.sub.j.
However, since the above-mentioned path data are insufficient, S-, M- and T-function instructions must be inserted. As an example, in a case where cutting is to be performed while a spindle is being rotated at a spindle velocity 1500, S-function instruction data "S1500" must be inserted into the block (H). If a coolant is to be turned on prior to the start of cutting and turned off at the end of cutting, then an M-function instruction "M.quadrature..quadrature." for coolant turn-on must be inserted between the blocks (H) and (I), and an M-function instruction "M .circle. .circle. " for coolant turn-off must be inserted between the block (M) and the block "N".
Thus, in order to obtain a complete NC program, it is necessary to insert miscellaneous data into the motion definition statement, or into the path data created by the automatic programming unit, in advance. FIG. 1 is an example of a very simple machining operation. In sophisticated machining, however, it is necessary to insert great quantities of miscellaneous data.
For the above reason, research has been directed toward an arrangement in which an automatic programming unit produces a complete NC program containing all of the miscellaneous data. Nevertheless, a complete NC program cannot be produced for all kinds of machining. In other words, while a complete NC program may be creatable for machining performed by a specific machine tool, a complete NC program cannot necessarily be created for machining performed by another machine tool. In a system designed for general purpose machining programming, adopting an arrangement in which miscellaneous data are produced automatically in response to all requests is undesirable because such would produce a large processing program load.
Accordingly, miscellaneous data must inevitably be inserted into a motion definition statement or path data (hereafter, a motion definition statement will also be referred to as path data) by the operator. Heretofore, however, a method has not been available through which miscellaneous data can be inserted into path data at suitable locations by a simple operation and without error.